//#define __DEBUG__
// by Xeno
#define THIS_FILE "fn_kbsendmsgunit.sqf"
#include "x_setup.sqf"

#ifndef __TT__
private "_kbsound";
_kbsound = if (count _this > 3) then {_this select 3} else {[]};
GVAR(kb_logic1) kbTell [_this select 0,GVAR(kb_topic_side),_this select 1,["1","",_this select 2,_kbsound],"GROUP"];
#else
private "_kbsound";
_kbsound = if (count _this > 3) then {_this select 3} else {[]};
switch (side (_this select 0)) do {
	case blufor: {GVAR(hq_logic_en1) kbTell [_this select 0,"HQ_W",_this select 1,["1","",_this select 2,_kbsound],"SIDE"]};
	case opfor: {GVAR(hq_logic_ru1) kbTell [_this select 0,"HQ_E",_this select 1,["1","",_this select 2,_kbsound],"SIDE"]};
};
#endif